# -*- coding: utf-8 -*-
import socket
import hashlib


user = 'lily'
code = '1134'

def user_md5(code, rand_str):
    md5 = hashlib.md5(code.encode('utf-8'))
    md5.update(rand_str.encode('utf-8'))
    return md5.digest()


sk = socket.socket()
sk.connect(('127.0.0.1', 9001))

sk.send(b'hello')

sk.close()